Optimal. Leaf size=170 \[ \frac{b \left (-5 a^2 b^2+6 a^4+2 b^4\right ) \tanh ^{-1}\left (\frac{a+b \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{a^3 d \left (a^2-b^2\right )^{5/2}}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \csc (c+d x))}-\frac{b^2 \cot (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \csc (c+d x))^2}+\frac{x}{a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.318968, antiderivative size = 170, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.583, Rules used = {3785, 4060, 3919, 3831, 2660, 618, 206} \[ \frac{b \left (-5 a^2 b^2+6 a^4+2 b^4\right ) \tanh ^{-1}\left (\frac{a+b \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{a^3 d \left (a^2-b^2\right )^{5/2}}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \csc (c+d x))}-\frac{b^2 \cot (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \csc (c+d x))^2}+\frac{x}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3785
Rule 4060
Rule 3919
Rule 3831
Rule 2660
Rule 618
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{(a+b \csc (c+d x))^3} \, dx &=-\frac{b^2 \cot (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \csc (c+d x))^2}-\frac{\int \frac{-2 \left (a^2-b^2\right )+2 a b \csc (c+d x)-b^2 \csc ^2(c+d x)}{(a+b \csc (c+d x))^2} \, dx}{2 a \left (a^2-b^2\right )}\\ &=-\frac{b^2 \cot (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \csc (c+d x))^2}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \csc (c+d x))}+\frac{\int \frac{2 \left (a^2-b^2\right )^2-a b \left (4 a^2-b^2\right ) \csc (c+d x)}{a+b \csc (c+d x)} \, dx}{2 a^2 \left (a^2-b^2\right )^2}\\ &=\frac{x}{a^3}-\frac{b^2 \cot (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \csc (c+d x))^2}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \csc (c+d x))}-\frac{\left (b \left (6 a^4-5 a^2 b^2+2 b^4\right )\right ) \int \frac{\csc (c+d x)}{a+b \csc (c+d x)} \, dx}{2 a^3 \left (a^2-b^2\right )^2}\\ &=\frac{x}{a^3}-\frac{b^2 \cot (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \csc (c+d x))^2}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \csc (c+d x))}-\frac{\left (6 a^4-5 a^2 b^2+2 b^4\right ) \int \frac{1}{1+\frac{a \sin (c+d x)}{b}} \, dx}{2 a^3 \left (a^2-b^2\right )^2}\\ &=\frac{x}{a^3}-\frac{b^2 \cot (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \csc (c+d x))^2}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \csc (c+d x))}-\frac{\left (6 a^4-5 a^2 b^2+2 b^4\right ) \operatorname{Subst}\left (\int \frac{1}{1+\frac{2 a x}{b}+x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^3 \left (a^2-b^2\right )^2 d}\\ &=\frac{x}{a^3}-\frac{b^2 \cot (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \csc (c+d x))^2}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \csc (c+d x))}+\frac{\left (2 \left (6 a^4-5 a^2 b^2+2 b^4\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (1-\frac{a^2}{b^2}\right )-x^2} \, dx,x,\frac{2 a}{b}+2 \tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^3 \left (a^2-b^2\right )^2 d}\\ &=\frac{x}{a^3}+\frac{b \left (6 a^4-5 a^2 b^2+2 b^4\right ) \tanh ^{-1}\left (\frac{b \left (\frac{a}{b}+\tan \left (\frac{1}{2} (c+d x)\right )\right )}{\sqrt{a^2-b^2}}\right )}{a^3 \left (a^2-b^2\right )^{5/2} d}-\frac{b^2 \cot (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \csc (c+d x))^2}-\frac{b^2 \left (5 a^2-2 b^2\right ) \cot (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \csc (c+d x))}\\ \end{align*}
Mathematica [A] time = 1.10303, size = 216, normalized size = 1.27 \[ \frac{\csc ^2(c+d x) (a \sin (c+d x)+b) \left (-\frac{3 a b^2 \left (2 a^2-b^2\right ) \cot (c+d x) (a \sin (c+d x)+b)}{(a-b)^2 (a+b)^2}-\frac{2 b \left (-5 a^2 b^2+6 a^4+2 b^4\right ) \csc (c+d x) (a \sin (c+d x)+b)^2 \tan ^{-1}\left (\frac{a+b \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{b^2-a^2}}\right )}{\left (b^2-a^2\right )^{5/2}}+\frac{a b^3 \cot (c+d x)}{(a-b) (a+b)}+2 (c+d x) \csc (c+d x) (a \sin (c+d x)+b)^2\right )}{2 a^3 d (a+b \csc (c+d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.115, size = 796, normalized size = 4.7 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.645056, size = 1994, normalized size = 11.73 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\left (a + b \csc{\left (c + d x \right )}\right )^{3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18064, size = 401, normalized size = 2.36 \begin{align*} -\frac{\frac{{\left (6 \, a^{4} b - 5 \, a^{2} b^{3} + 2 \, b^{5}\right )}{\left (\pi \left \lfloor \frac{d x + c}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a}{\sqrt{-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} \sqrt{-a^{2} + b^{2}}} + \frac{4 \, a^{3} b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - a b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 10 \, a^{4} b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a^{2} b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 2 \, b^{5} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 16 \, a^{3} b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 7 \, a b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 5 \, a^{2} b^{3} - 2 \, b^{5}}{{\left (a^{6} - 2 \, a^{4} b^{2} + a^{2} b^{4}\right )}{\left (b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 2 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + b\right )}^{2}} - \frac{d x + c}{a^{3}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]